﻿<%@ Page Language="C#" MasterPageFile="~/Report/reportSite.master" AutoEventWireup="true" CodeFile="productQuantity_Report.aspx.cs"
    Theme="DXConnect" Inherits="productStatistic_ReportForm" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx1" %>
<%@ Register assembly="DevExpress.XtraCharts.v12.1.Web, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraCharts.Web" tagprefix="dxchartsui" %>
<%@ Register assembly="DevExpress.XtraCharts.v12.1, Version=12.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraCharts" tagprefix="cc1" %>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <div class="mainContent registration">
        <div class="contentHeader">
            <div class="content">
                <img id="registrationTitle" src=../Images/title_product_statistic.png 
                    alt="Schedule" />
            </div>
        </div>
        <div class="content">

            <table style="width:100%;">
                <tr>
                    <td style="width: 101px">
                        &nbsp;</td>
                    <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                             </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 101px">
                        &nbsp;</td>
                    <td>
                        <dxchartsui:WebChartControl ID="productStatisticWebChartControl" runat="server" 
                            BackColor="#FAFAFA" CrosshairEnabled="True" 
                            DataSourceID="productStatisticSqlDataSource" Height="490px" Width="741px">
                            <diagramserializable>
                                <cc1:SimpleDiagram>
                                </cc1:SimpleDiagram>
                            </diagramserializable>
<FillStyle>
    <optionsserializable>
        <cc1:SolidFillOptions />
    </optionsserializable>
</FillStyle>

                            <legend alignmenthorizontal="Center" alignmentvertical="BottomOutside"></legend>
                            <seriesserializable>
                                <cc1:Series ArgumentDataMember="Model" CrosshairLabelVisibility="True" 
                                    LabelsVisibility="True" Name="Product Statistic By Quantity Chart" 
                                    SynchronizePointOptions="False" ToolTipEnabled="True" 
                                    ValueDataMembersSerializable="QuantitySUM">
                                    <viewserializable>
                                        <cc1:PieSeriesView ExplodeMode="MaxValue" RuntimeExploding="False">
                                            <titles>
                                                <cc1:SeriesTitle />
                                            </titles>
                                        </cc1:PieSeriesView>
                                    </viewserializable>
                                    <labelserializable>
                                        <cc1:PieSeriesLabel LineVisible="True" Position="Radial">
                                            <fillstyle>
                                                <optionsserializable>
                                                    <cc1:SolidFillOptions />
                                                </optionsserializable>
                                            </fillstyle>
                                            <pointoptionsserializable>
                                                <cc1:PiePointOptions PointView="ArgumentAndValues">
                                                    <valuenumericoptions format="Percent" precision="0" />
                                                </cc1:PiePointOptions>
                                            </pointoptionsserializable>
                                        </cc1:PieSeriesLabel>
                                    </labelserializable>
                                    <legendpointoptionsserializable>
                                        <cc1:PiePointOptions Pattern="{A} {V}" PercentOptions-ValueAsPercent="False" 
                                            PointView="ArgumentAndValues">
                                            <valuenumericoptions format="Number" precision="0" />
                                        </cc1:PiePointOptions>
                                    </legendpointoptionsserializable>
                                </cc1:Series>
                            </seriesserializable>

<SeriesTemplate><ViewSerializable>
    <cc1:PieSeriesView RuntimeExploding="False">
    </cc1:PieSeriesView>
</ViewSerializable>
<LabelSerializable>
    <cc1:PieSeriesLabel LineVisible="True">
        <fillstyle>
            <optionsserializable>
                <cc1:SolidFillOptions />
            </optionsserializable>
        </fillstyle>
        <pointoptionsserializable>
            <cc1:PiePointOptions>
            </cc1:PiePointOptions>
        </pointoptionsserializable>
    </cc1:PieSeriesLabel>
</LabelSerializable>
<LegendPointOptionsSerializable>
    <cc1:PiePointOptions>
    </cc1:PiePointOptions>
</LegendPointOptionsSerializable>
</SeriesTemplate>

<CrosshairOptions showvaluelabels="True" showvalueline="True"><CommonLabelPositionSerializable>
<cc1:CrosshairMousePosition></cc1:CrosshairMousePosition>
</CommonLabelPositionSerializable>
</CrosshairOptions>

<ToolTipOptions><ToolTipPositionSerializable>
<cc1:ToolTipMousePosition></cc1:ToolTipMousePosition>
</ToolTipPositionSerializable>
</ToolTipOptions>
                        </dxchartsui:WebChartControl>
                    </td>

                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 101px">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 101px">
                        &nbsp;</td>
                    <td>
                        Product:&nbsp;
                        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                            DataSourceID="productListSqlDataSource" DataTextField="Model" 
                            DataValueField="Model" Height="21px" 
                            onselectedindexchanged="DropDownList1_SelectedIndexChanged" Width="194px">
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 101px">
                        &nbsp;</td>
                    <td>
                        <dxchartsui:WebChartControl ID="individualProductWebChartControl" 
                            runat="server" DataSourceID="individualProductSqlDataSource" Height="490px" 
                            Width="736px">
<FillStyle><OptionsSerializable>
<cc1:SolidFillOptions></cc1:SolidFillOptions>
</OptionsSerializable>
</FillStyle>

                            <seriestemplate>
                                <viewserializable>
                                    <cc1:LineSeriesView>
                                    </cc1:LineSeriesView>
                                </viewserializable>
                                <labelserializable>
                                    <cc1:PointSeriesLabel LineVisible="True">
                                        <fillstyle>
                                            <optionsserializable>
                                                <cc1:SolidFillOptions />
                                            </optionsserializable>
                                        </fillstyle>
                                        <pointoptionsserializable>
                                            <cc1:PointOptions>
                                            </cc1:PointOptions>
                                        </pointoptionsserializable>
                                    </cc1:PointSeriesLabel>
                                </labelserializable>
                                <legendpointoptionsserializable>
                                    <cc1:PointOptions>
                                    </cc1:PointOptions>
                                </legendpointoptionsserializable>
                            </seriestemplate>

<CrosshairOptions><CommonLabelPositionSerializable>
<cc1:CrosshairMousePosition></cc1:CrosshairMousePosition>
</CommonLabelPositionSerializable>
</CrosshairOptions>

<ToolTipOptions><ToolTipPositionSerializable>
<cc1:ToolTipMousePosition></cc1:ToolTipMousePosition>
</ToolTipPositionSerializable>
</ToolTipOptions>
                        </dxchartsui:WebChartControl>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 101px">
                        &nbsp;</td>
                    <td>
                        <asp:SqlDataSource ID="productStatisticSqlDataSource" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CocShopDatabaseConnectionString %>" SelectCommand="SELECT b.ProductID, b.Model, SUM(a.Quantity) as QuantitySUM
FROM OrderScheduling a, Product b
WHERE (a.ProductID = b.ProductID)
GROUP BY b.ProductID, b.Model"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="productListSqlDataSource" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CocShopDatabaseConnectionString %>" SelectCommand="SELECT b.Model
FROM OrderScheduling a, Product b
WHERE (a.ProductID = b.ProductID)
GROUP BY b.Model"></asp:SqlDataSource>
                        <asp:SqlDataSource ID="individualProductSqlDataSource" runat="server">
                        </asp:SqlDataSource>
                        <br />
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>

        </div>
    </div>
</asp:Content>
